<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>不改变display实现水平居中</title>
    <style>
        body{
            text-align: center;
        }
        /*
        如何让内联元素或内联块元素水平居中
        1.改变元素自身的display属性，使用margin-left，margin-right方案
        2.给他爹设置text-align:center;
        */
    </style>
</head>
<body>
    <div>
        <a href="#">a</a>
        <button>btn</button>
    </div>
</body>
</html>